.page {
  min-height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 遮罩层样式 */
.maskOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.maskContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
}

.faceFrame {
  width: 280px;
  height: 350px;
  border: 3px solid #1890ff;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 40px;
  backdrop-filter: blur(10px);
}

.scanningArea {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.scanningLine {
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #1890ff, transparent);
  animation: scanning 2s infinite;
  margin-bottom: 20px;
}

.scanningText {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.maskInstruction {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  background-color: rgba(24, 144, 255, 0.2);
  padding: 15px 30px;
  border-radius: 25px;
  border: 1px solid rgba(24, 144, 255, 0.5);
}

@keyframes scanning {
  0% {
    transform: translateY(-100px);
  }
  100% {
    transform: translateY(100px);
  }
}

/* 导航栏样式 */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navLeft {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
  color: #333;
}

.navTitle {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.navRight {
  display: flex;
  align-items: center;
  font-size: 16px;
  color: #666;
}

/* 主要内容区域 */
.content {
  flex: 1;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 人脸识别区域 */
.faceRecognitionArea {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.faceIcon {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.faceIconInner {
  width: 80px;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faceSilhouette {
  width: 50px;
  height: 50px;
  background-color: #fff;
  border-radius: 50%;
  position: relative;
}

.faceSilhouette::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 6px;
  height: 6px;
  background-color: #1890ff;
  border-radius: 50%;
  box-shadow: 18px 0 0 #1890ff;
}

.faceSilhouette::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 8px;
  background-color: #1890ff;
  border-radius: 4px;
}

.instruction {
  color: #1890ff;
  font-size: 14px;
  text-align: center;
  line-height: 1.4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 300px;
}

.instructionRight {
  color: #1890ff;
  font-size: 14px;
}

/* 眨眼检测覆盖层 */
.blinkOverlay {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.avatarContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.avatar {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.avatarFace {
  width: 80px;
  height: 80px;
  background-color: #fff;
  border-radius: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.avatarEyes {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.avatarEye {
  width: 12px;
  height: 8px;
  background-color: #333;
  border-radius: 50%;
  position: relative;
  animation: avatarBlink 3s infinite;
}

.avatarEyeball {
  width: 6px;
  height: 6px;
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 3px;
  animation: avatarEyeMove 2s infinite;
}

.avatarNose {
  width: 4px;
  height: 4px;
  background-color: #ff6b9d;
  border-radius: 50%;
  margin-bottom: 6px;
}

.avatarMouth {
  width: 16px;
  height: 8px;
  border: 2px solid #333;
  border-top: none;
  border-radius: 0 0 16px 16px;
}

.blinkText {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  animation: textPulse 1.5s infinite;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes avatarBlink {
  0%, 90%, 100% {
    height: 8px;
  }
  95% {
    height: 1px;
  }
}

@keyframes avatarEyeMove {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1px);
  }
  75% {
    transform: translateX(1px);
  }
}

@keyframes textPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* 验证结果样式 */
.successOverlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.successIcon {
  width: 80px;
  height: 80px;
  background-color: #52c41a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  font-weight: bold;
  margin-bottom: 20px;
  animation: successPulse 1s ease-in-out;
}

.successText {
  color: #52c41a;
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.failedOverlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.failedIcon {
  width: 80px;
  height: 80px;
  background-color: #ff4d4f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  font-weight: bold;
  margin-bottom: 20px;
  animation: failedShake 0.5s ease-in-out;
}

.failedText {
  color: #ff4d4f;
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 操作按钮样式 */
.actionButtons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
  max-width: 300px;
}

.retryButton {
  flex: 1;
  height: 44px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

.cancelButton {
  flex: 1;
  height: 44px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

@keyframes successPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes failedShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* 视频容器样式 */
.videoContainer {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
}

.video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* 镜像效果 */
}

.canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: scaleX(-1); /* 镜像效果 */
}

.scanningOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.scanningOverlay .scanningLine {
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ff00, transparent);
  animation: scanning 2s infinite;
  margin-bottom: 20px;
}

.scanningOverlay .scanningText {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* 个人信息显示 */
.personalInfo {
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.infoRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.infoRow:last-child {
  border-bottom: none;
}

.infoLabel {
  color: #666;
  font-size: 14px;
}

.infoValue {
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

/* 按钮区域 */
.buttonArea {
  width: 100%;
  max-width: 400px;
}

.verifyButton {
  height: 48px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

/* 底部技术支持信息 */
.footer {
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 12px;
  background-color: #fff;
  border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 375px) {
  .faceIcon {
    width: 100px;
    height: 100px;
  }
  
  .faceIconInner {
    width: 70px;
    height: 70px;
  }
  
  .faceSilhouette {
    width: 45px;
    height: 45px;
  }
  
  .instruction {
    font-size: 13px;
  }
}
